﻿using System;
using System.Diagnostics;
using System.Windows.Forms;

namespace WindowsApplication2.网络.基础.uri
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                UriBuilder ub = new UriBuilder();
                ub.Host = this.tbHost.Text;
                ub.Port = int.Parse(this.tbPort.Text);
                ub.Scheme = Uri.UriSchemeHttp;
                //ub.Path = this.tbPath.Text;

                Uri ui = ub.Uri;
                Process ps = new Process();
                ps.StartInfo.FileName = "iexplore.exe";
                ps.StartInfo.Arguments = ui.ToString();
                ps.Start();
            }
            catch (Exception ee) { }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
        }
    }
}